#include "AC2Msg.h"

configuration AC2AppC
{
}
implementation
{
	components AC2P;
	components ActiveMessageC;
	components new AMSenderC(AM_RADIO_MSG) as RadioSenderC;
	components new AMReceiverC(AM_RADIO_MSG) as RadioReceiverC;
	components new TimerMilliC() as TempTimer;
	components LedsC;
	components MainC;
	components new SensirionSht11C() as TempC;
    components SerialActiveMessageC as Serial;
    components HplMsp430GeneralIOC as GeneralIO;
	components new TimerMilliC() as PWMTimer;
	

	AC2P.Boot -> MainC;
	AC2P.TempTimer -> TempTimer;
	AC2P.Leds -> LedsC;
	AC2P.RadioSend -> RadioSenderC;
	AC2P.RadioReceive -> RadioReceiverC;
	AC2P.RadioPacket -> RadioSenderC;
	AC2P.RadioControl -> ActiveMessageC;
	AC2P.TempRead -> TempC.Temperature;

    AC2P.SerialPacket -> Serial;
    AC2P.SerialSend -> Serial.AMSend[AM_SERIAL_MSG];
    AC2P.SerialControl -> Serial;
    AC2P.SerialReceive -> Serial.Receive[AM_SERIAL_MSG];
    
    AC2P.gpio61 -> GeneralIO.Port61;    
    AC2P.gpio62 -> GeneralIO.Port62;
    AC2P.PWMTimer -> PWMTimer;
}
